#   Name: CMakeLists.txt
#   Createed by: Le Manh Thang
#   Date: 10/03/2020
#   


cmake_minimum_required (VERSION 3.0)

enable_language(C)
enable_language(CXX)

project (darknet)

set(CMAKE_CXX_STANDARD 11)
set(CMAKE_CXX_STANDARD_REQUIRED True)
#set(CMAKE_STATIC_LINKER_FLAGS "-lm -lpthread -lstdc++ -std=c++11")
# add share libray opencv
#set( OpenCV_DIR libopencv_world.so)
#link_directories(/media/thanglmb/DATA/myProject/AI_DL/libOpenCV/lib)
#include_directories(/media/thanglmb/DATA/myProject/AI_DL/libOpenCV/include/opencv4)


# add share library darknet
file( GLOB SOURCES_DARKNET src/*.cpp src/*.c src/*.cu )
include_directories(${CMAKE_SOURCE_DIR}/darknet/include)
include_directories(${CMAKE_SOURCE_DIR}/src)
include_directories( ${CMAKE_SOURCE_DIR}/3rdparty/stb/include)

add_library(darknet ${SOURCES_DARKNET} )

target_include_directories(darknet PUBLIC ${CMAKE_SOURCE_DIR}/include
                                    PRIVATE ${CMAKE_SOURCE_DIR}/src)

target_compile_features(darknet PUBLIC cxx_std_11)

